home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / NVRAMPlugin.a < prev    next >
Encoding:
Text File  |  1996-05-01  |  2.6 KB  |  98 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        NVRAMPlugin.a
  3. ;
  4. ;    Version:    Technology:    
  5. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  6. ;
  7. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.     IF &TYPE('__NVRAMPLUGIN__') = 'UNDEFINED' THEN
  17. __NVRAMPLUGIN__ SET 1
  18.  
  19.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  20.     include 'Types.a'
  21.     ENDIF
  22.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  23. ;
  24. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  25. ;    status codes
  26. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  27. ;
  28.  
  29. kNVRAMNoError                    EQU        0
  30. kNVRAMTimeout                    EQU        1
  31. kNVRAMUnexpectedError            EQU        2
  32. kNVRAMMemoryError                EQU        3
  33. kNVRAMParameterError            EQU        4
  34. kNVRAMDeviceError                EQU        5
  35. kNVRAMUnexpectedDeviceRequest    EQU        6
  36. kNVRAMControllerError            EQU        7
  37. kNVRAMConsistencyCheckError        EQU        8
  38. ;
  39. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  40. ;    Plugin Calls Provided by the Family
  41. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  42. ;
  43. ;
  44. ; extern void NVRAMFamRequestComplete(OSStatus theStatus)
  45. ;
  46.     IF GENERATINGCFM THEN
  47.         IMPORT_CFM_FUNCTION NVRAMFamRequestComplete
  48.     ENDIF
  49.  
  50. ;
  51. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  52. ;    Plugin Calls Provided by the Plugin
  53. ;≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
  54. ; all plugin calls are async
  55. ; the plugin starts the i/o and returns immediately
  56. ; the plugin ISR calls NVRAMFamRequestComplete() when the i/o is completed
  57. ;
  58.  
  59. kNVRAMPluginCurrentRevision        EQU        $000D11E2
  60. NVRAMPluginVersion        RECORD 0
  61. major                     ds.l    1                ; offset: $0 (0)
  62. reserved0                 ds.l    1                ; offset: $4 (4)
  63. reserved1                 ds.l    1                ; offset: $8 (8)
  64. reserved2                 ds.l    1                ; offset: $C (12)
  65. sizeof                     EQU *                    ; size:   $10 (16)
  66.                         ENDR
  67. NVRAMPluginDispatchTable RECORD 0
  68. version                     ds        NVRAMPluginVersion ; offset: $0 (0)
  69. Init                     ds.l    1                ; offset: $10 (16)
  70. Read                     ds.l    1                ; offset: $14 (20)
  71. Write                     ds.l    1                ; offset: $18 (24)
  72. sizeof                     EQU *                    ; size:   $1C (28)
  73.                         ENDR
  74. ;
  75. ; extern OSStatus NVRAMPluginInit(void )
  76. ;
  77.     IF GENERATINGCFM THEN
  78.         IMPORT_CFM_FUNCTION NVRAMPluginInit
  79.     ENDIF
  80.  
  81. ;
  82. ; extern OSStatus NVRAMPluginRead(UInt16 offset, UInt8 *data, UInt16 count)
  83. ;
  84.     IF GENERATINGCFM THEN
  85.         IMPORT_CFM_FUNCTION NVRAMPluginRead
  86.     ENDIF
  87.  
  88. ;
  89. ; extern OSStatus NVRAMPluginWrite(UInt16 offset, UInt8 *data, UInt16 count)
  90. ;
  91.     IF GENERATINGCFM THEN
  92.         IMPORT_CFM_FUNCTION NVRAMPluginWrite
  93.     ENDIF
  94.  
  95.     ENDIF
  96.     ENDIF ; __NVRAMPLUGIN__ 
  97.  
  98.